local skel = fk.CreateSkill {
  name = "lb_old__fenghao",
}

Fk:loadTranslationTable {
  ["lb_old__fenghao"] = "封号",
  [":lb_old__fenghao"] = "每轮限一次，当你受到伤害后，你可以令一名本轮成为过你<a href=':lb_old__hairu'><font color='red'>〖骇入〗</font></a>目标的角色翻面。",

  ["#lb_old__fenghao"] = "封号：你可以令一名角色翻面",

  ["$lb_old__fenghao1"] = "这么快就上钩了？",
  ["$lb_old__fenghao2"] = "百分百弱点击破。",
}

skel:addEffect(fk.Damaged, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and
        player:usedSkillTimes(skel.name, Player.HistoryRound) == 0
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    local ts = table.filter(room:getAlivePlayers(), function(p)
      return table.contains(player:getTableMark("lb_old__hairu-round"), p.id)
    end)
    if #ts == 0 then return end
    local ps = room:askToChoosePlayers(player, {
      targets = ts,
      min_num = 1,
      max_num = 1,
      skill_name = skel.name,
      prompt = "#lb_old__fenghao"
    })
    if #ps > 0 then
      event:setCostData(self, { tos = ps })
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local t = event:getCostData(self).tos[1]
    room:doIndicate(player, { t })
    t:turnOver()
  end,
})

return skel
